package cn.imvc.app.models;

import java.util.List;

import org.springframework.data.domain.Page;

import cn.imvc.app.entities.Area;
import cn.imvc.data.domain.ViewRequest;

public interface AreaModel {
	Page<Area> find(ViewRequest viewRequest);

	Area get(int id);

	Area save(Area entity);

	Area update(Area entity);

	void delete(int id);

	void deleteBatch(int[] ids);

	List<Area> findByName(String name);
	List<Area> findByName(String name, Area parent);
	
	String areaToJson();

	List<Area> getAreaList(int parentId);
}
